import request from '@/utils/request.js'
export const page = (data) => {
    return request.get(
        '/homework/getPage',
        {
            params:data,
        }
    )
}
export const gettype = (type) => {
    return request.get(
        `/questions/getTypeList/${type}`,
    )
}
export const getq = (id) => {
    return request.get(
        `/questions/getQuestion/${id}`,
    )
}
export const add = (data) => {
    return request.post(
        '/homework/add',
        data
    )
}

export const dele = (id) => {
    return request.delete(
        `/homework/delete/${id}`,
    )
}
export const update =(id,data) =>{
    return request.put(
        `/homework/update/${id}`,
        data
    )
}
export const compleated = (data) => {
    return request.post(
        '/score/getOverPeopleSum',null,
        {
            params:data,
        }
    )
}
export const accuracy = (data) => {
    return request.post(
        '/score/getAccuracy',null,
        {
            params:data,
        }
    )
}
export const rightsum = (data) => {
    return request.post(
        '/score/getRightSum',null,
        {
            params:data,
        }
    )
}
export const listclass = () => {
    return request.get('/classroom/getList')
}
export const listhw = () => {
    return request.get('/homework/getList')
}
export const findclass = (id) => {
    return request.get(
        `/classroom/findStu/${id}`,
    )
}
export const score = (data) => {
    return request.post(
        '/score/getScore',null,
        {
        params:data,
    }
    )
}